$(document).ready(function () {
    $("#searchButton").click(function () {
        var strSearch = $("#searchText").val();
        $.ajax(
        {
            type: "GET",
            contentType: "application/json; charset=iso8859-1",
            url: "/Article/WSArticleSearch/",
            data: { "strSearch": strSearch },
            dataType: "json",
            success: function (data) {
                $("#ArticleList").empty();
                $("#ArticleSearch").empty();
                $("#authorListTemplate").tmpl(data).hide().appendTo("#ArticleSearch").fadeIn("slow");

            },
            error: function (xhr, err) {
                alert("readyState: " + xhr.readyState + "\nstatus: " + xhr.status);
                alert("responseText: " + xhr.responseText);
            }
        });
    });


});